int numsize=0;
 int **arr;
 int arr_size=0;
int** levelOrder(struct TreeNode* root, int* returnSize, int** returnColumnSizes) {
    *returnSize=0;
    if(root==NULL)
        return NULL;
    arr_size=0;
    arr=(int**)malloc(sizeof(int*)*2001);
    *returnColumnSizes=malloc(sizeof(int*)*2001);
    struct TreeNode* queue[2001];
    int front=-1,tail=-1;    
    struct TreeNode* p;
    queue[++tail]=root;
    while(front!=tail)
    {
        int current_count=tail-front;   //求当前层次节点个数
        arr[arr_size]=(int*)malloc(sizeof(int)*current_count);
        numsize=0;
        for(int i=0;i<current_count;i++)
        {
            p=queue[++front];
            arr[arr_size][numsize++]=p->val;
            if(p->left!=NULL)
            {
                queue[++tail]=p->left;
            }
            if(p->right!=NULL)
            {
                queue[++tail]=p->right;
            }
        }
        (*returnColumnSizes)[arr_size++]=numsize;

    }
    *returnSize=arr_size;
    return arr;

}